<template>
<div>
  <input v-model="innerName" placeholder="姓名"/>
  <input v-model="innerAge" placeholder="年龄"/>
</div>
</template>

<script>
import { useVModels } from '@vueuse/core'
export default {
  name: "DemoUseModals",
  props: {
    name: String,
    age: String
  },
  created() {
    console.log('name:', this.name)
  },
  setup(props, {emit}){
    console.log(emit)
    console.log(useVModels(props,emit));
    const { name, age }=useVModels(props,emit);
    console.log('name, age', name, age);
    const innerName = name;
    const innerAge = age;
    return {
      innerName,
      innerAge
    }
  }
}
</script>

<style scoped>

</style>
